using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.TestDrivens;
using Pixysoft.Framework.Logs.Core;
using Pixysoft.Framework.Logs.Controller;

namespace Pixysoft.Framework.Logs.TestCases
{
    [TestDriven(TestDrivenType.UnitTest, "LogNonStructureSerializeController")]
    class UnitTest_008_LogNonStructureSerializeController
    {
        private static IAssert assert = Assert.New(true);

        [TestCase("Serialize")]
        public static void TestCase_000_Serialize()
        {
            Assert.Call(UnitTest_003_LogReport.TestCase_000_InitializeReport);

            ILogReport report = Assert.Cache.Pop<ILogReport>();

            assert.Write("-----------------------------");


            Assert.Call(UnitTest_005_LogDocumentSummary.TestCase_000_Serialize);

            LogDocumentSummary summary = Assert.Cache.Pop<LogDocumentSummary>();

            assert.Write("-----------------------------");

            assert.Write(LogNonStructureSerializeController.Instance.Serialize(report.Document));

            assert.Write(LogNonStructureSerializeController.Instance.Serialize(report.Document.Records[0]));

            assert.Write(LogNonStructureSerializeController.Instance.Serialize(report));

            assert.Write(LogNonStructureSerializeController.Instance.Serialize(summary));
        }
    }
}
